echo off
cput "Setup by CONFIG.CNF File (Yes or <cr> / No) = "
cget !5
if !5=="n"
   let !5="N"
endi
if !5=="N"
   exec copy config.cnf config.bak
   exec del config.cnf
   open #1,config.cnf,W
else
   let !5="Y"
   open #1,config.cnf,R
endi
:clock
cput "==== Clock Setup ====\n"
if !5=="N"
   clock

   cput "Key in select = "
   cget !1
   put #1,!1
else
   get #1,!1
endi
clock !1 
if !5<>"N"
   clock

endi
:map
cput "==== Map Setup ====\n"
map 0,0ffff=no
if !5=="N"
   repeat
      cput "Memory Start Address or <cr> = "
      cget !1
      put #1,!1
      if !1==""
         goto map40
      endi
      cput "Memory End Address           = "
      cget !2
      put #1,!2
      cput "Mapping  Type (RW/RO/NO/US)  = "
      cget !3
      put #1,!3
      map !1,!2=!3
   endr
else
   repeat
      get #1,!1
      if !1==""
         goto map40
      endi
      get #1,!2
      get #1,!3
      map !1,!2=!3
   endr
endi
:map40
if !5=="Y"
   echo on
   map
   echo off
endi
:pin
cput "==== Pin Setup ====\n"
if !5=="N"
   cput "Pin Control (Di/En)     = "
   cget !1
   put #1,!1
else
   get #1,!1
endi
pin all=!1
if !5=="Y"
   echo on
   pin
   echo off
endi
:ems
cput "==== Emselect Setup ====\n"
if !5=="N"
   ems
   repeat
      cput "Key in select (A-H or <cr> ) = "
      cget !1
      put #1,!1
      if !1==""
         goto ems10
      endi
      cput "key in switch (DI/EN/number) = "
      cget !2
      put #1,!2
      ems !1=!2
   endr
else
   repeat
      get #1,!1
      if !1==""
         goto ems10
      endi
      get #1,!2
      ems !1=!2
   endr
endi
:ems10
if !5=="Y"
   echo on
   ems
   echo off
endi
:object
cput "==== Object Setup ====\n"
if !5=="N"
   exec dir *.abs
   cput "Load Object File Name   = "
   cget !1
   put #1,!1
else
   get #1,!1
   cput "Load Object File Name   = ",!1,"\n"
endi
r res
load !1
:other
cput "==== Other Setup commands ====\n"
if !5=="N"
   repeat
      cput "Other setup command or <cr> = "
      cget !1
      put #1,!1
      if !1==""
         goto other10
      endi
      !1
   endr
else
   repeat
      get #1,!1
      if !1==""
         goto other10
      endi
      cput !1,"\n"
      !1
   endr
endi
:other10
:exit
r res  
close #1
